TAFJ Tools

This section describes the TAFJ tools such as tRun, tDiag, tShowCheck, tCrypt, tFindDevice and tCreateBasicReplacement.

tRun

tRun is the main entry point for running a program. This is a script in the /bin directory. It is used to execute the compiled Basic files.

tDiag

tDiag is a part of the TAFJ tools. It provides information about your environment like the java version, TAFJ version, etc. The tDiag utility is used to display information about your TAFJ installation and projects setup. It is useful in pin-pointing problem areas of the setup.

tShow

tShow is part of the TAFJ tools. It provides information on the compiled Basic source. It can search for the resource on one single project and multiple ones. It can also produce a report of all the duplicate classes when run with –d argument.

tShowCheck

tShowCheck is part of the TAFJ tools. It shows where all the BASIC source files have been compiled.  It reports the error and warning messages to a flat file if a class is found missing in the precompiled or in the classes folder.

It takes three command line parameters:

  • -s <PATH_OF_SOURCE_FOLDER>
  • -p <PATH_OF_PRECOMPILED> or <PATH_OF_CLASSES_FOLDER>
  • -r <PATH_OF_REPORT_FOLDER>

tCrypt

tCrypt is part of the TAFJ tools. It allows encrypting the password specified in temn.tafj.jdbc.password. This will encrypt the password with DES3 algorithm. The key used to encrypt is auto generated and stored in a file called .key in the conf directory of your TAFJ installation.

Example

To encrypt the password for the database mentioned in configuration file, run the following command:

tCrypt -cf tafj

The resulting output looks like this:

C:\TAFJ\bin>tCrypt
Configuration: 'C:\TAFJ\bin\..\conf\tafj.properties'
Configuration file changed with encrypted password.
C:\TAFJ\bin>

Below password is displayed in tafj.properties.

Before tCrypt, password will look like this:

temn.tafj.jdbc.username       = t24
temn.tafj.jdbc.password       = secret


After tCrypt, password changes:

temn.tafj.jdbc.username       = t24
temn.tafj.jdbc.password       = ::P6PeGkfV134=


Read Only Database resources can be configured with multiple databases separated by comma. Before tCrypt, password will look like this:

temn.tafj.jdbc.ro.username     = t24user1,t24user2
temn.tafj.jdbc.ro.password     = secret1,secret2

After tCrypt, each password separated by comma is encrypted and will look like this:

temn.tafj.jdbc.ro.username     = t24user1,t24user2
temn.tafj.jdbc.ro.password     = ::23hKMsIlA2UF5h1UnPi/0Q==, ::XK7aygpDaRk=

A new password for another database can be added and encrypted using tCrypt:

temn.tafj.jdbc.ro.username     = t24user1,t24user2,t24user3
temn.tafj.jdbc.ro.password     = ::23hKMsIlA2UF5h1UnPi/0Q==, ::XK7aygpDaRk=, secret3

After tCrypt, encrypted password will look like this:

temn.tafj.jdbc.ro.username     = t24user1,t24user2,t24user3
temn.tafj.jdbc.ro.password     = ::23hKMsIlA2UF5h1UnPi/0Q==, ::XK7aygpDaRk=, ::whHSwmvjtr0= 

Also existing password can be changed and encrypted using tCrypt:

temn.tafj.jdbc.ro.username     = t24user1,t24user2,t24user3
temn.tafj.jdbc.ro.password     = ::23hKMsIlA2UF5h1UnPi/0Q==, newsecret2, ::whHSwmvjtr0=

After tCrypt, encrypted password will look like this:

temn.tafj.jdbc.ro.username     = t24user1,t24user2,t24user3
temn.tafj.jdbc.ro.password     = ::23hKMsIlA2UF5h1UnPi/0Q==, ::rtn2RQvhVfK56eRbPtCqEg==, ::whHSwmvjtr0=

tFindDevice

tFindDevice is part of the TAFJ tools. It provides information about your Default Printer on your system and a list of printers which are available on your system.

tCreateBasicReplacement

This section shows how you can easily and safely write java code and invoke it directly from BASIC. You can write your own java class and setup the TAFJ runtime to use it instead of a BASIC subroutine. You can also invoke your java class without having a corresponding BASIC subroutine. Of course, the whole environment (like COMMONs) is available in your java class.


Bookmark Name Actions
Feedback
x